package com.tuananh.radnom.gwt.server;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.tuananh.radnom.service.config.INetConnService;
import com.tuananh.radnom.service.config.impl.NetConnService;

public class ContextUtils {
	static ApplicationContext context;
	public static ApplicationContext getContext(){
		if (context==null)
			context = new ClassPathXmlApplicationContext("classpath*:applicationContext.xml");
		return context;
	}
	public static INetConnService getNetConnService(){
		return (INetConnService) getContext().getBean("netConnConfigService");
	}
}
